From: Jan Beulich Date: Mon, 19 Dec 2016 16:52:42 +0000 (+0100) Subject: x86: fix asm() constraint in clear_user() X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~3107 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=157db407533fb55c0ce0c133991e3cb951b76484;p=xen.git x86: fix asm() constraint in clear_user() Commit 2fdf5b2554 ("x86: streamline copying to/from user memory") wrongly used "g" here, when it obviously needs to be a register. Reported-by: Andrew Cooper Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --- diff --git a/xen/arch/x86/usercopy.c b/xen/arch/x86/usercopy.c index d1303a9874..1d1ef075c9 100644 --- a/xen/arch/x86/usercopy.c +++ b/xen/arch/x86/usercopy.c @@ -141,7 +141,7 @@ unsigned clear_user(void __user *to, unsigned n) _ASM_EXTABLE(0b,3b) _ASM_EXTABLE(1b,2b) : [cnt] "=&c" (n), [to] "+D" (to) - : [bytes] "g" (n & (BYTES_PER_LONG - 1)), + : [bytes] "r" (n & (BYTES_PER_LONG - 1)), [longs] "0" (n / BYTES_PER_LONG), "a" (0) ); clac(); }